﻿<!--#include file="../../Inc/Const.Asp"-->
<%
dim plus
set plus = new cls_plus
plus.open("digg")
plus.state
plus.newtpl("plus_digg.html")

Dim Rs
Set Rs = DB("Select Top 10 [ID],[Cid],[Title],[Description],[Diyname],[Createtime],[Diggs],[Viewpath],[Author] From [{pre}Content] Order By [Diggs] Desc",1)

Dim HTML,HList,i
HTML = plus.skin("top")
Dim aTitle,aDescription,aUrl,aDateTime
Do While Not Rs.Eof
	i = i + 1
	aUrl = BuildViewPath(Rs("ID"),Rs("Cid"),Rs("Diyname"),Rs("Createtime"),Rs("Viewpath"))
	aTitle = Rs("Title")
	aDescription = Left(Rs("Description"),180)
	aDateTime = Year(Rs("createtime")) & "-" & Month(Rs("createtime")) & "-" & Day(Rs("createtime"))
	HList = plus.skin("List")
	HList = Replace(Replace(Replace(Replace(Replace(Replace(HList,"$aurl", aUrl),"$atitle", atitle),"$adescription", adescription),"$adatetime", adatetime),"$adigg", Rs("Diggs")),"$aauthor", Rs("author"))
	HTML = HTML & HList
	If i >= 10 Then Exit Do
	Rs.MovenExt
Loop
HTML = HTML & plus.skin("end")

call plus.settpl("{out}",HTML)
Response.Write plus.gettpl
Set Plus = Nothing

%>